package day10_poly.多态作业;

import java.util.Scanner;

//制作披萨
public class MakePizza {
    public static Pizza show(){
        System.out.println("请选择想要制作的比萨(1.培根比萨 2.海鲜比萨)：");
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        Pizza pizza = null;
        if (i == 1) {
            //制作培根比萨
            System.out.println("请输入培根克数：");
            int gram = scanner.nextInt();
            System.out.println("请输比萨大小：");
            int size = scanner.nextInt();
            System.out.println("请输入比萨价格：");
            int price = scanner.nextInt();
            pizza = new BaconPizza("培根比萨", price, size, gram);
        } else if (i == 2) {
            //制作海鲜比萨
            System.out.println("请输入配料信息：");
            String mixture = scanner.next();

            System.out.println("请输比萨大小：");
            int size = scanner.nextInt();

            System.out.println("请输入比萨价格：");
            int price = scanner.nextInt();
            pizza = new SeaFoodPizza("海鲜比萨", price, size, mixture);
        }
        return pizza;
    }
}
